﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using ECommerce.Common;
using ECommerce.BLL.Product;

namespace ECommerce.Web.Site
{
    public partial class AddFavorite : SitePage
    {
        private int ProductID
        {
            get
            {
                return int.Parse(Request["ProductID"]);
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            base.CheckLogin();
            if (!string.IsNullOrEmpty(SiteSession.MemberLoginName))
            {
                ECProductBO product = new ECProductBO();
                product.AddToFavorite(SiteSession.MemberID, ProductID);
                Response.Redirect("MemberFavorite.aspx");
            }
            
        }
    }
}